import {Component, Inject, OnInit} from '@angular/core';
import {MAT_DIALOG_DATA, MatDialogRef } from '@angular/material';
import {OverlayContainer} from '@angular/cdk/overlay';

@Component({
  selector: 'app-invite',
  templateUrl: './invite.component.html',
  styleUrls: ['./invite.component.scss']
})
export class InviteComponent implements OnInit {
  options = [
    'One',
    'Two',
    'Three'
  ];

  constructor(
    public dialogRef: MatDialogRef<InviteComponent>,
    @Inject(MAT_DIALOG_DATA) private data: any,
    private oc: OverlayContainer
  ) { }

  ngOnInit() {
    console.log(this.data);
    if (this.data.darkTheme) {
      this.oc.getContainerElement().classList.add('unicorn-dark-theme');
    }
  }
  onNoClick() {
    this.dialogRef.close('invite new data');
  }
}
